package com.itheima.xiancheng;

public class MyThread  extends Thread {
    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() { //线程开启执行的方法
        for (int i = 0; i <5 ; i++) {
            System.out.println(getName()+"线程开启了"+i);
//            String name = Thread.currentThread().getName();
//            System.out.println(name);
        }

    }
}
